#ifndef SHOWBLOG_H
#define SHOWBLOG_H

#include <QObject>
#include <QWidget>
#include <QMouseEvent>
#include <QString>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QSpacerItem>
#include <QLabel>
#include <QTextBrowser>
#include <QDebug>
#include "pixlabel.h"
#include <QTextEdit>

class ShowBlog : public QWidget
{
    Q_OBJECT
public:
    ShowBlog(QWidget *parent = nullptr,  QMap<QString, QString> *map=nullptr, int type=0);
    ~ShowBlog();
    bool eventFilter(QObject *obj, QEvent *event);
    QList<PixLabel *> labelList;
    void setPraise(bool isPraise, QString p);
    void setCollection(bool isCollection, QString c);
    void setComment(QString c);
    QString getPraise();
    QString getCollection();
    QString getComment();
private:
    PixLabel *labelTitle;
    QTextBrowser *textContent;
    PixLabel *labelTime;
    PixLabel *labelComment;
    PixLabel *labelCollection;
    PixLabel *labelPraise;
    QMap<QString, QString> map;
    QString praiseNum, collectionNum, commentNum;
    bool isPraise=false, isCollection=false;

    QList<QString> strList;

signals:
    void labelClicked(QMap<QString, QString> map, QString type);
};

#endif // SHOWBLOG_H
